import Vue from 'vue'
import Router from 'vue-router'
import Swiper from '@/components/swiper'
import Login from '@/pages/login/login'
import Forget from '@/pages/login/forget'


/**====班级====**/
import Class from '@/pages/class/class'
//作业
import Task from '@/pages/class/task/task'
import TaskDetail from '@/pages/class/task/taskDetail'
import AddTask from '@/pages/class/task/addTask'

//成绩
import Exam from '@/pages/class/exam/exam'
import StudentExam from '@/pages/class/exam/studentExam'
import StudentExamList from '@/pages/class/exam/studentExamList'
import StudentExamDetail from '@/pages/class/exam/studentExamDetail'
import StudentAnalyze from '@/pages/class/exam/studentAnalyze'
import studentAnalyzeDetail from '@/pages/class/exam/studentAnalyzeDetail'
import ClassAnalyze from '@/pages/class/exam/classAnalyze'

//通知
import NoticeList from '@/pages/class/notice/list'
import NoticeDetail from '@/pages/class/notice/detail'

//请假
import Leave from '@/pages/class/leave/leave'
import LeaveDetail from '@/pages/class/leave/leaveDetail'

//家校通
import Book from '@/pages/class/book/book'

//班级课表
import ClassTemplate from '@/pages/class/timetable/classTemplate'
//教师课表
import TeacherTemplate from '@/pages/class/timetable/teacherTemplate'



/**====一卡通====**/
import Card from '@/pages/card/card'

/**====办公====**/
import Work from '@/pages/work/work'


/**====个人中心====**/
import User from '@/pages/user/user'


Vue.use(Router)

export default new Router({

  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/forget',
      name: 'Forget',
      component: Forget
    },
/**====班级=====**/
    {
      path: '/class',
      name: 'Class',
      component: Class,
      meta:{
        topShow:true,
        footerShow:true,
      }
    },
    //作业
    {
      path: '/class/task',
      name: 'Task',
      component: Task
    },
    {
      path: '/class/task/detail',
      name: 'TaskDetail',
      component: TaskDetail
    },
    {
      path: '/class/task/add',
      name: 'AddTask',
      component: AddTask
    },
    //成绩
    {
      path: '/class/exam',
      name: 'Exam',
      component: Exam
    },
    //学生成绩查询
    {
      path: '/class/exam/studentExam',
      name: 'StudentExam',
      component: StudentExam
    },
    //学生成绩查询
    {
      path: '/class/exam/studentExam/list',
      name: 'StudentExamList',
      component: StudentExamList
    },
    {
      path: '/class/exam/studentExam/list/detail',
      name: 'StudentExamDetail',
      component: StudentExamDetail
    },
    //学生成绩分析
    {
      path: '/class/exam/studentAnalyze',
      name: 'StudentAnalyze',
      component: StudentAnalyze
    },
    {
      path: '/class/exam/studentAnalyze/detail',
      name: 'studentAnalyzeDetail',
      component: studentAnalyzeDetail
    },
    //班级成绩分析
    {
      path: '/class/exam/classAnalyze',
      name: 'ClassAnalyze',
      component: ClassAnalyze
    },

    //通知
    {
      path: '/class/noticeList',
      name: 'NoticeList',
      component: NoticeList
    },
    {
      path: '/class/noticeDetail',
      name: 'NoticeDetail',
      component: NoticeDetail
    },

    //请假
    {
      path: '/class/leave',
      name: 'Leave',
      component: Leave
    },
    {
      path: '/class/leave/detail',
      name: 'LeaveDetail',
      component: LeaveDetail
    },
    //家校通
    {
      path: '/class/book',
      name: 'Book',
      component: Book
    },
    //班级课表
    {
      path: '/class/classTemplate',
      name: 'ClassTemplate',
      component: ClassTemplate
    },
    //班级课表
    {
      path: '/class/teacherTemplate',
      name: 'TeacherTemplate',
      component: TeacherTemplate
    },

    /**====一卡通=====**/
    {
      path: '/card',
      name: 'Card',
      component: Card,
      meta:{
        footerShow:true,
      }
    },
    /**====办公=====**/
    {
      path: '/work',
      name: 'Work',
      component: Work,
      meta:{
        footerShow:true,
      }
    },
    /**====个人中心=====**/
    {
      path: '/user',
      name: 'User',
      component: User,
      meta:{
        footerShow:true,
      }
    },
    /**====测试=====**/
    {
      path: '/swiper',
      name: 'Swiper',
      component: Swiper
    },
  ]
})
